<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Insert title here</title>
	<include file="Public:easyui_res" />
</head>
<body>
<div id="tb" style="padding:5px 0;height:auto;">
	<div style="margin: 10px 0 10px 10px" >
		<!-- form表单 指定id和name之后会自动带到服务器 -->
		<form name="searchform" method="get" action="" id ="searchform" style="height:auto;margin-bottom: 20px;">
			<label for="time_for">统计时间:</label>
			<input type="datetime" value="{$timeFor}" name="time_for" id="time_for" style="width:140px;height:32px">
			<label>至</label>
			<input style="width:140px;height:32px" value="{$timeTo}" type="datetime" name="time_to" id="time_to">
			<a href="javascript:void(0);" id="submit_search" class="easyui-linkbutton" iconCls="icon-search"  style="width:60px;height:32px">查询</a>
		</form>
	</div>
</div>
<!-- 展示数据部分 -->
<table id="dg"  style="width:100%; "  title="查询结果"
	   data-options="rownumbers:true,
			singleSelect:true,
			pagination:false,
			ctrlSelect:true,
			fitColumns:true,
			loadMsg:'正在加载,请等待....',
			url:'__URL__/getList',
			method:'get',
			toolbar:'#tb',
			onLoadSuccess:function(data){ loaddgSuc(data);}
			">
	<thead>
	<tr>
		<th data-options="field:'stat_dt',align:'center',width:'10'">日期</th>
		<th data-options="field:'Android',align:'center',width:'10'">Android</th>
		<th data-options="field:'IOS',align:'center',width:'10'">IOS</th>
		<th data-options="field:'All',formatter:formatSum,align:'center',width:'10'">合计</th>
	</tr>
	</thead>
</table>
<script type="text/javascript">
	var height = document.documentElement.clientHeight;
	height = height - 20;
	$("#dg").css("height",height+"px");
	$(function(){
		$('#time_for').datebox().datebox('calendar').calendar({
			validator: function(date){
				var now = new Date();
				return date <= now;
			}
		});
		$('#time_to').datebox().datebox('calendar').calendar({
			validator: function(date){
				var now = new Date();
				return date <= now;
			}
		});
	});
	function formatSum(val,row) {
		return Number(row.Android)+Number(row.IOS);
	}
</script>
</body>
</html>